package com.greendao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.txsj.scan.bean.EpcGoodsInfo;
import com.txsj.scan.bean.EpcInfo;
import com.txsj.scan.bean.GlobalGoodsInfo;
import com.txsj.scan.bean.GoodsInfo;
import com.txsj.scan.bean.RecordInfo;
import com.txsj.scan.bean.TagGroupInfo;
import com.txsj.scan.bean.TagInfo;
import com.txsj.scan.bean.UnusefulEpc;

import com.greendao.EpcGoodsInfoDao;
import com.greendao.EpcInfoDao;
import com.greendao.GlobalGoodsInfoDao;
import com.greendao.GoodsInfoDao;
import com.greendao.RecordInfoDao;
import com.greendao.TagGroupInfoDao;
import com.greendao.TagInfoDao;
import com.greendao.UnusefulEpcDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig epcGoodsInfoDaoConfig;
    private final DaoConfig epcInfoDaoConfig;
    private final DaoConfig globalGoodsInfoDaoConfig;
    private final DaoConfig goodsInfoDaoConfig;
    private final DaoConfig recordInfoDaoConfig;
    private final DaoConfig tagGroupInfoDaoConfig;
    private final DaoConfig tagInfoDaoConfig;
    private final DaoConfig unusefulEpcDaoConfig;

    private final EpcGoodsInfoDao epcGoodsInfoDao;
    private final EpcInfoDao epcInfoDao;
    private final GlobalGoodsInfoDao globalGoodsInfoDao;
    private final GoodsInfoDao goodsInfoDao;
    private final RecordInfoDao recordInfoDao;
    private final TagGroupInfoDao tagGroupInfoDao;
    private final TagInfoDao tagInfoDao;
    private final UnusefulEpcDao unusefulEpcDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        epcGoodsInfoDaoConfig = daoConfigMap.get(EpcGoodsInfoDao.class).clone();
        epcGoodsInfoDaoConfig.initIdentityScope(type);

        epcInfoDaoConfig = daoConfigMap.get(EpcInfoDao.class).clone();
        epcInfoDaoConfig.initIdentityScope(type);

        globalGoodsInfoDaoConfig = daoConfigMap.get(GlobalGoodsInfoDao.class).clone();
        globalGoodsInfoDaoConfig.initIdentityScope(type);

        goodsInfoDaoConfig = daoConfigMap.get(GoodsInfoDao.class).clone();
        goodsInfoDaoConfig.initIdentityScope(type);

        recordInfoDaoConfig = daoConfigMap.get(RecordInfoDao.class).clone();
        recordInfoDaoConfig.initIdentityScope(type);

        tagGroupInfoDaoConfig = daoConfigMap.get(TagGroupInfoDao.class).clone();
        tagGroupInfoDaoConfig.initIdentityScope(type);

        tagInfoDaoConfig = daoConfigMap.get(TagInfoDao.class).clone();
        tagInfoDaoConfig.initIdentityScope(type);

        unusefulEpcDaoConfig = daoConfigMap.get(UnusefulEpcDao.class).clone();
        unusefulEpcDaoConfig.initIdentityScope(type);

        epcGoodsInfoDao = new EpcGoodsInfoDao(epcGoodsInfoDaoConfig, this);
        epcInfoDao = new EpcInfoDao(epcInfoDaoConfig, this);
        globalGoodsInfoDao = new GlobalGoodsInfoDao(globalGoodsInfoDaoConfig, this);
        goodsInfoDao = new GoodsInfoDao(goodsInfoDaoConfig, this);
        recordInfoDao = new RecordInfoDao(recordInfoDaoConfig, this);
        tagGroupInfoDao = new TagGroupInfoDao(tagGroupInfoDaoConfig, this);
        tagInfoDao = new TagInfoDao(tagInfoDaoConfig, this);
        unusefulEpcDao = new UnusefulEpcDao(unusefulEpcDaoConfig, this);

        registerDao(EpcGoodsInfo.class, epcGoodsInfoDao);
        registerDao(EpcInfo.class, epcInfoDao);
        registerDao(GlobalGoodsInfo.class, globalGoodsInfoDao);
        registerDao(GoodsInfo.class, goodsInfoDao);
        registerDao(RecordInfo.class, recordInfoDao);
        registerDao(TagGroupInfo.class, tagGroupInfoDao);
        registerDao(TagInfo.class, tagInfoDao);
        registerDao(UnusefulEpc.class, unusefulEpcDao);
    }
    
    public void clear() {
        epcGoodsInfoDaoConfig.clearIdentityScope();
        epcInfoDaoConfig.clearIdentityScope();
        globalGoodsInfoDaoConfig.clearIdentityScope();
        goodsInfoDaoConfig.clearIdentityScope();
        recordInfoDaoConfig.clearIdentityScope();
        tagGroupInfoDaoConfig.clearIdentityScope();
        tagInfoDaoConfig.clearIdentityScope();
        unusefulEpcDaoConfig.clearIdentityScope();
    }

    public EpcGoodsInfoDao getEpcGoodsInfoDao() {
        return epcGoodsInfoDao;
    }

    public EpcInfoDao getEpcInfoDao() {
        return epcInfoDao;
    }

    public GlobalGoodsInfoDao getGlobalGoodsInfoDao() {
        return globalGoodsInfoDao;
    }

    public GoodsInfoDao getGoodsInfoDao() {
        return goodsInfoDao;
    }

    public RecordInfoDao getRecordInfoDao() {
        return recordInfoDao;
    }

    public TagGroupInfoDao getTagGroupInfoDao() {
        return tagGroupInfoDao;
    }

    public TagInfoDao getTagInfoDao() {
        return tagInfoDao;
    }

    public UnusefulEpcDao getUnusefulEpcDao() {
        return unusefulEpcDao;
    }

}
